package com.qh.util;

import java.util.HashMap;

import android.os.Handler;

import com.qh.util.HttpUpload;

/**
 * 
 * <p>Description: [服务器下载线程]</p>
 * @author  <a href="mailto: 18951603040@189.cn">蔡锷</a>
 * @version 1.0
 */
@SuppressWarnings("unchecked")
public abstract class BaseHttpServletThread extends Thread{
	protected Handler handler;
	private HashMap mParams;
	private String mUrl;
	
	public BaseHttpServletThread(Handler handler, String url, HashMap params)
	{
		this.handler = handler;
		this.mUrl = url;
		this.mParams = params;
	}

	@Override
	public void run()
	{
		resolveObject();
	}
	
	protected String SubAndGet() throws Exception
	{
		return HttpUpload.upload(this.mUrl, this.mParams);
	}
	
	public abstract void resolveObject();
}
